package com.qianfeng.biquge.service;

import com.github.pagehelper.PageInfo;
import com.qianfeng.biquge.pojo.Books;
import com.qianfeng.biquge.vo.BooksVo;
import org.springframework.web.bind.annotation.PathVariable;

import java.io.UnsupportedEncodingException;
import java.util.List;

public interface BookService {

    Books addBook(Books books);

    PageInfo<BooksVo> getAllBookByBookNameOrByAuthorName(String name, int pageNum, int pageSize) throws UnsupportedEncodingException;

    int deleteBook( Long bookId);

    List<BooksVo> getBookByAuthorid( Long authorId);

    List<BooksVo> getBookByAuthoridByBookId( Long authorId, Long bookId);

    List<BooksVo> getBookByCategoryIdIsRandom( Long categoryId);

}
